package cn.edu.sjtu.se.peakfactory.service.bean;

import java.util.List;

import cn.edu.sjtu.se.peakfactory.dao.bean.Element;
import cn.edu.sjtu.se.peakfactory.dao.bean.Formula;

public class FormulaVB {
	private Long id;
	private String description;
	private String formula;
	private Integer status;
	private CouponVB couponVB;
	private List<ElementVB> elementVBs;

	public FormulaVB(Formula f) {
		id = f.getId();
		description = f.getDescription();
		formula = f.getFormula();
		status = f.getStatus();
		couponVB = new CouponVB(f.getCoupon());
		if(f.getElements()!=null){
			for (Element e:f.getElements()){
				elementVBs.add(new ElementVB(e));
			}
		}
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getFormula() {
		return formula;
	}

	public void setFormula(String formula) {
		this.formula = formula;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public CouponVB getCouponVB() {
		return couponVB;
	}

	public void setCouponVB(CouponVB couponVB) {
		this.couponVB = couponVB;
	}

	public List<ElementVB> getElementVBs() {
		return elementVBs;
	}

	public void setElementVBs(List<ElementVB> elementVBs) {
		this.elementVBs = elementVBs;
	}

}
